//封装axios请求
//1.导入axios
import axs from 'axios'
import {commonParam} from "../param/commonParam";


const instance = axs.create({
    baseURL: commonParam.serverUrl
})

// 请求拦截器(给后台发送的请求)
instance.interceptors.request.use(config => {
    return config
})

// 响应拦截器（后台返回来的参数）
instance.interceptors.response.use(
    response => response.data,
    error => new Promise((e) => {
    })
)



export default instance